<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Module Image: /home/antoine/LIF7_td/src/image.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Module Image
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.2 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">image.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;stdlib.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="pixel_8h_source.html">pixel.h</a>&quot;</code><br/>
<code>#include &lt;stdio.h&gt;</code><br/>
</div>
<p><a href="image_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structImage.html">Image</a></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a09752f3133d816f341b8829132336043"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="image_8h.html#a09752f3133d816f341b8829132336043">imInit</a> (<a class="el" href="structImage.html">Image</a> *Im, int dimx, int dimy)</td></tr>
<tr class="memdesc:a09752f3133d816f341b8829132336043"><td class="mdescLeft">&#160;</td><td class="mdescRight">imInit initialise dimx et dimy (après vérification) de la structure <a class="el" href="structImage.html">Image</a> puis alloue le tableau de pixel dans le tas  <a href="#a09752f3133d816f341b8829132336043"></a><br/></td></tr>
<tr class="memitem:a5c53a00ee1712cbf4236ecf8c5c34471"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="image_8h.html#a5c53a00ee1712cbf4236ecf8c5c34471">imLibere</a> (<a class="el" href="structImage.html">Image</a> *Im)</td></tr>
<tr class="memitem:a9a91b54dbb066e5d191fb6f23316c7f4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structImage.html">Image</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="image_8h.html#a9a91b54dbb066e5d191fb6f23316c7f4">imCreer</a> (int dimx, int dimy)</td></tr>
<tr class="memitem:a0432c9a9f4a307b34549cca27df59fb6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="image_8h.html#a0432c9a9f4a307b34549cca27df59fb6">imDetruire</a> (<a class="el" href="structImage.html">Image</a> **pim)</td></tr>
<tr class="memitem:ae312c8b781c888ee84c25bda908a3b55"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structPixel.html">Pixel</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="image_8h.html#ae312c8b781c888ee84c25bda908a3b55">getPix</a> (const <a class="el" href="structImage.html">Image</a> *Im, int x, int y)</td></tr>
<tr class="memitem:a5547e2784de260bc57e46673adbc4121"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="image_8h.html#a5547e2784de260bc57e46673adbc4121">setPix</a> (<a class="el" href="structImage.html">Image</a> *Im, int x, int y, const <a class="el" href="structPixel.html">Pixel</a> *couleur)</td></tr>
<tr class="memitem:ab37b9cd64497d1e4fb0b87a8c6fb7873"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="image_8h.html#ab37b9cd64497d1e4fb0b87a8c6fb7873">imDessineRectangle</a> (<a class="el" href="structImage.html">Image</a> *Im, int Xmin, int Ymin, int Xmax, int Ymax, const <a class="el" href="structPixel.html">Pixel</a> *couleur)</td></tr>
<tr class="memitem:afe91cb0a289ff537a64ef98dd333e71f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="image_8h.html#afe91cb0a289ff537a64ef98dd333e71f">imEffacer</a> (<a class="el" href="structImage.html">Image</a> *Im, const <a class="el" href="structPixel.html">Pixel</a> *couleur)</td></tr>
<tr class="memitem:a20b9ad35b6db7bd09d7452574d04dd50"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="image_8h.html#a20b9ad35b6db7bd09d7452574d04dd50">imSauver</a> (const <a class="el" href="structImage.html">Image</a> *pIm, const char filename[])</td></tr>
<tr class="memitem:a0a1f0b9be4b910e1cfc2648cfa9e38fd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="image_8h.html#a0a1f0b9be4b910e1cfc2648cfa9e38fd">imOuvrir</a> (<a class="el" href="structImage.html">Image</a> *pIm, const char filename[])</td></tr>
<tr class="memitem:afadf8ab43119d304c72e201d0d95164d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="image_8h.html#afadf8ab43119d304c72e201d0d95164d">imPrintf</a> (const <a class="el" href="structImage.html">Image</a> *pIm)</td></tr>
<tr class="memitem:a8d4964490fb1a67b590ce77acd78031f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="image_8h.html#a8d4964490fb1a67b590ce77acd78031f">imTestRegression</a> ()</td></tr>
</table>
<h2>Function Documentation</h2>
<a class="anchor" id="ae312c8b781c888ee84c25bda908a3b55"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structPixel.html">Pixel</a> getPix </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structImage.html">Image</a> *&#160;</td>
          <td class="paramname"><em>Im</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">getPix récupère le pixel de coordonnée (x,y) en vérifiant leur validité
</pre><p> la formule pour passer de 2D à un tab 1D est pix[y*dimx+x] </p>

</div>
</div>
<a class="anchor" id="a9a91b54dbb066e5d191fb6f23316c7f4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structImage.html">Image</a>* imCreer </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>dimx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>dimy</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>imCreer alloue dans le tas une structure <a class="el" href="structImage.html">Image</a> puis l'initialise avec imInit =&gt; 2 lignes </p>

</div>
</div>
<a class="anchor" id="ab37b9cd64497d1e4fb0b87a8c6fb7873"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void imDessineRectangle </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structImage.html">Image</a> *&#160;</td>
          <td class="paramname"><em>Im</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Xmin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Ymin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Xmax</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Ymax</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structPixel.html">Pixel</a> *&#160;</td>
          <td class="paramname"><em>couleur</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>dessine un rectangle de couleur dans l'image en utilisant setPix </p>

</div>
</div>
<a class="anchor" id="a0432c9a9f4a307b34549cca27df59fb6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void imDetruire </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structImage.html">Image</a> **&#160;</td>
          <td class="paramname"><em>pim</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">Libere le tableau de pixel en appelant imLibere puis détruit
</pre><p> la structure image </p>

</div>
</div>
<a class="anchor" id="afe91cb0a289ff537a64ef98dd333e71f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void imEffacer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structImage.html">Image</a> *&#160;</td>
          <td class="paramname"><em>Im</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structPixel.html">Pixel</a> *&#160;</td>
          <td class="paramname"><em>couleur</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>efface l'image en appelant imDessineRectangle avec le bon rectangle </p>

</div>
</div>
<a class="anchor" id="a09752f3133d816f341b8829132336043"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void imInit </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structImage.html">Image</a> *&#160;</td>
          <td class="paramname"><em>Im</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>dimx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>dimy</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>imInit initialise dimx et dimy (après vérification) de la structure <a class="el" href="structImage.html">Image</a> puis alloue le tableau de pixel dans le tas </p>

</div>
</div>
<a class="anchor" id="a5c53a00ee1712cbf4236ecf8c5c34471"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void imLibere </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structImage.html">Image</a> *&#160;</td>
          <td class="paramname"><em>Im</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Libère la mémoire du tableau de pixels et met les champs dimx et dimy de la structure à 0 </p>

</div>
</div>
<a class="anchor" id="a0a1f0b9be4b910e1cfc2648cfa9e38fd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void imOuvrir </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structImage.html">Image</a> *&#160;</td>
          <td class="paramname"><em>pIm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char&#160;</td>
          <td class="paramname"><em>filename</em>[]&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="afadf8ab43119d304c72e201d0d95164d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void imPrintf </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structImage.html">Image</a> *&#160;</td>
          <td class="paramname"><em>pIm</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a20b9ad35b6db7bd09d7452574d04dd50"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void imSauver </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structImage.html">Image</a> *&#160;</td>
          <td class="paramname"><em>pIm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char&#160;</td>
          <td class="paramname"><em>filename</em>[]&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a8d4964490fb1a67b590ce77acd78031f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void imTestRegression </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">Effectue tout une série de test vérifiant que le module fonctionne et que les
</pre><p> champ de la structure sont conformes </p>

</div>
</div>
<a class="anchor" id="a5547e2784de260bc57e46673adbc4121"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void setPix </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structImage.html">Image</a> *&#160;</td>
          <td class="paramname"><em>Im</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structPixel.html">Pixel</a> *&#160;</td>
          <td class="paramname"><em>couleur</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>setPix modifie le pixel de coord (x,y) </p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Mar 5 2013 14:19:51 for Module Image by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1.2
</small></address>
</body>
</html>
